package com.erclab.internal.xpresso.reportelements;

import com.erclab.internal.xpresso.exceptions.ReportException;
import com.erclab.internal.xpresso.reportelements.ReportElement;
import com.erclab.internal.xpresso.reports.Report;

public class PrintGeoCoordinates extends ReportElement {

	@Override
	public String toHTML(String columnValue, String uniqueKeyValue, Report theReport) throws ReportException {
		if (this.parameters != null){
			if (this.parameters.equals("lat")){
				return columnValue.substring(0, columnValue.indexOf(" "));
			} else if (this.parameters.equals("lon")){
				return columnValue.substring(columnValue.indexOf(" ") + 1,  columnValue.length());
			} else {
				return columnValue;
			}
		} else
		return columnValue;
	}

	
	
	
}
